// 解析 Array 对象

let names ;

console.log( '- - - - - Array静态属性 - - - - -' );

names = Object.getOwnPropertyNames( Array );
console.log( names );

console.log( '- - - - - Array原型属性 - - - - -' );

names = Object.getOwnPropertyNames( Array.prototype );
console.log( names );
// console.log( typeof Array.prototype[ 'description' ] );

console.log( '- - - - - Array构造函数 - - - - -' );

let a = new Array('朱亚红','付彪','任丽','窦之鹏','秦雯雯','温生民');
console.log( a );
console.log( a.toString() );

let b = new Array(10,20);
console.log( b );
console.log( b.toString() );

let c = new Array(10);
console.log( c );
console.log( c.toString() );

let d = Array( 10, 20 ); // 以普通函数执行Array其作用与构造函数系统
console.log( d , Array.isArray( d ) );
console.log( d.toString() );

// 使用数组字面量隐式创建Array实例
let e = [30,40]; // 数组字面量和对象字面量都属于 JavaScript Object Notation
console.log( Array.isArray( e ) );
console.log( e instanceof Array );
console.log( e.__proto__ === Array.prototype );
console.log( Object.getPrototypeOf( e ) === Array.prototype );

console.log( '- - - - - Array.of - - - - -' );

let f = Array.of( 10 ); // 创建一个仅包含单个元素的数组
console.log( Array.isArray( f ) );
console.log( f.toString() , f.length );

let g = Array.of( 10 , 20 , 30 , 40 );
console.log( g.toString() , g.length );